import axios from '~/axios'

// 获取指定图库的图片列表
export function getImageList(id, page = 1) {
    return axios.get(`/admin/image_class/${id}/image/${page}`)
}

// 修改图片名称
export function updateImage(id, name) {
    return axios.get(`/admin/image/${id}`, { name })
}

// 删除图片
export function deleteImage(ids) {
    return axios.post(`/admin/image/delete_all`, { ids })
}

export const uploadImageAction = import.meta.env.VITE_APP_BASE_API + '/admin/image/upload'
